import React from 'react'
import {Button, Input} from "antd";
import 'antd/dist/antd.css'
import { List } from 'antd'


class todolistUI extends React.Component{
    render(){
        return (<div>
            <Input placeholder={this.props.inputvalue} onChange={this.props.handleChange} style={{width:"300px",margin:"50px 50px 50px 100px"}}/>
            <Button type="primary" onClick={this.props.handleBtnClick}>提交</Button>
            <List
                size="small"
                bordered
                dataSource={this.props.list}
                renderItem={(item,index) => <List.Item onClick={index=>this.props.deleteItem(index)}>{item}</List.Item>}
            />
        </div>)
    }
}
export default todolistUI
